'''
1.读写出一段 Python 代码实现分绍一个 list 里面的元素,比如[1,2,3,...100]变成[[1,2,3],[4,5,6]....]
'''
a = [x for x in range(1,101)]
b = [a[i:i+3] for i in range(0,len(a),3)]
print(b)

li =[[i,i + 1,i + 2] if i <= 98 else [i for i in range(i,101)] for i in range(1,101,3)]
print(li)

'''
2.找出里面名字含有两个"e"的效到新列表中:
names = [['Tom', 'Billy','Jefferson', 'Andrew', 'wesley', 'Steven', 'Joe'],
         ['Alice','Jill','Ana','Wendy','Jennifer', 'Sherry', 'Eva']]
'''
names = [['Tom', 'Billy','Jefferson', 'Andrew', 'wesley', 'Steven', 'Joe'],
         ['Alice','Jill','Ana','Wendy','Jennifer', 'Sherry', 'Eva']]
new_names = [j for i in names for j in i if i.count('e') >= 2]
print(new_names)

